let o = {};
o["1"] = "one";
console.log(o[1]); // one
console.log(o["1"]); // one
let a = [];
a[2] = "abc";
console.log(a.length); // 3
a["5"] = "bcd";
console.log(a.length); // 6
console.log(Object.keys(a)); // [ '2', '5' ]
// 下面语句相当于 a[6] = 1
a[6.0] = "cde";
console.log(a.length); // 7
console.log(Object.keys(a)); // [ '2', '5', '6' ]
a[7.3] = "def";
console.log(a.length); // 7
console.log(Object.keys(a)); // [ '2', '5', '6', '7.3' ]
// 会创建一个属性 "-1.23"
a[-1.23] = true;
